package com.ruoyi.system.service.evaluationService.evaluationServiceImpl;


import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.evaluation.Location;
import com.ruoyi.system.mapper.evaluation.LocationMapper;
import com.ruoyi.system.service.evaluationService.LocationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LocationServiceImpl implements LocationService {
    @Autowired
    private LocationMapper locationMapper;
    @Override
    public int insertLocation(Location location) {
        return locationMapper.insertLocation(location);
    }

    @Override
    public int deleteLocationById(int id) {
        return locationMapper.deleteLocationById(id);
    }

    @Override
    public int updateLocationById(int id) {
        return locationMapper.updateLocationById(id);
    }

    @Override
    public List<Location> selectLocation() {
        return locationMapper.selectLocation();
    }

    @Override
    public int deleteLocation(String ids) {
        Long[] locationIds = Convert.toLongArray(ids);
        return locationMapper.deleteLocation(locationIds);
    }
}
